package com.ag.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbLoginRecord entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_LOGIN_RECORD", schema = "dbo", catalog = "AGDB")
public class TbLoginRecord implements java.io.Serializable {

	// Fields

	private String lrId;
	private TbUser tbUser;
	private Date lrLoginTime;
	private Date tbLogoutTime;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbLoginRecord() {
	}

	/** minimal constructor */
	public TbLoginRecord(String lrId, Date lrLoginTime) {
		this.lrId = lrId;
		this.lrLoginTime = lrLoginTime;
	}

	/** full constructor */
	public TbLoginRecord(String lrId, TbUser tbUser, Date lrLoginTime,
			Date tbLogoutTime, String a, String b, String c) {
		this.lrId = lrId;
		this.tbUser = tbUser;
		this.lrLoginTime = lrLoginTime;
		this.tbLogoutTime = tbLogoutTime;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@Id
	@Column(name = "LR_ID", unique = true, nullable = false, length = 20)
	public String getLrId() {
		return this.lrId;
	}

	public void setLrId(String lrId) {
		this.lrId = lrId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "U_ID")
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LR_LOGIN_TIME", nullable = false, length = 23)
	public Date getLrLoginTime() {
		return this.lrLoginTime;
	}

	public void setLrLoginTime(Date lrLoginTime) {
		this.lrLoginTime = lrLoginTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "TB_LOGOUT_TIME", length = 23)
	public Date getTbLogoutTime() {
		return this.tbLogoutTime;
	}

	public void setTbLogoutTime(Date tbLogoutTime) {
		this.tbLogoutTime = tbLogoutTime;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}